<script setup>
import {useRoute} from "vue-router"
// 在 App.vue 或 main.js 中设置用户
// import { useChatStore } from './piniaStore/pinia.js';

// const chatStore = useChatStore();
// chatStore.setCurrentUser('Alice');


const route = useRoute();

// 根据当前路径生成 key，确保动态组件正确渲染
const key = () => route

</script>

<template>
<div>
  <div>
    <router-view :key="key"></router-view>
  </div>
</div>
</template>

<style scoped>

</style>
